style: Use gtk_widget_get_state() for the entry background
authorBenjamin Otte <otte@redhat.com>
Fri, 3 Sep 2010 15:09:00 +0000 (17:09 +0200)
committerBenjamin Otte <otte@redhat.com>
Fri, 3 Sep 2010 15:14:17 +0000 (17:14 +0200)
New code sets the entry background to GTK_STATE_ACTIVE when it has focus
and the active color in the default theme looks rather bad.

gtk/gtkstyle.c

index e8b13f372e72054e5ca1fa8ecc410d4586a62259..d4fa6594a90151851ccc6e897f0f5ba53bc32d87 100644 (file)
@@ -2746,7 +2746,7 @@ gtk_default_draw_flat_box (GtkStyle      *style,
           if (!strcmp ("viewportbin", detail))
             gc1 = &style->bg[GTK_STATE_NORMAL];
           else if (!strcmp ("entry_bg", detail))
-            gc1 = &style->base[state_type];
+            gc1 = &style->base[gtk_widget_get_state (widget)];
 
           /* For trees: even rows are base color, odd rows are a shade of
            * the base color, the sort column is a shade of the original color